$(document).ready(function(){
	//获取标签名称
	$('.js-usernames').each(function(){
		var _this = $(this);
		var articleId = _this.parent('tr').attr('dataid');
		$.ajax({
			type : "GET",
			url : '/articles/'+articleId+'/users',
			beforeSend : function(xhr) {
				_this.html('正在加载...');
			},
			error : function(xhr, status) {
				 _this.html("加载失败！"+xhr.responseText);
			},
			success : function(data) {
				_this.html('');
		       if(data && data.length > 0){
		    	  $.each(data,function(i,item){
		    		  var style='<span style="margin-left: 3px; padding:0px 5px;background-color:#EAEDED;">';
		    		  if(item.status != '1'){//如果是非正常状态，则打上黑框框
		    			  style='<span style="margin-left: 3px; padding:0px 5px;border-style: groove;">';
		    		  }
		    		  _this.append(style+item.fullname+'</span>');
		    	  });
		       }
			}
		});
	});

});